package com.woniuxy.lrz.carlproject.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniuxy.lrz.carlproject.controller.form.formgoods.GoodsInfoFindForm;
import com.woniuxy.lrz.carlproject.model.GoodInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.lrz.carlproject.service.dto.dtocar.CarDetailsTypeBrandDto;
import com.woniuxy.lrz.carlproject.service.dto.dtogoods.GoodsCarAndAttachDto;
import com.woniuxy.lrz.carlproject.service.dto.dtogoods.GoodsInfoByServiceAndCarDto;
import com.woniuxy.lrz.carlproject.service.dto.dtogoods.GoodsInfoDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 商品表 Mapper 接口
 * </p>
 *
 * @author lrz
 * @since 2022-09-28
 */
public interface GoodInfoMapper extends BaseMapper<GoodInfo> {

    Page<GoodsInfoDto> findGoodsInfo(@Param("page") Page<GoodInfo> page,
                                     @Param("goodsInfoFindForm") GoodsInfoFindForm goodsInfoFindForm);

    CarDetailsTypeBrandDto CarDetailsTypeBrandDto(Integer carDetailId);

    List<CarDetailsTypeBrandDto> loadAllCars();

    List<GoodsInfoByServiceAndCarDto> loadGoodsByServiceAndCar(@Param("serviceId") Integer serviceId,
                                                               @Param("carDetailId") Integer carDetailId);
}
